package net.huashitong.user.dao;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;
import net.huashitong.user.entity.Branch;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class BranchDao extends StringDao<Branch> {
    public List<Branch> getBranchByType(String branchType) {
        GenericQuery query = createQuery("obj");
        query.append(" and obj.branchType = :branchType").setParam("branchType", branchType);
        return query.listResult();
    }
}
